package com.china08.yxyapi.service.yxyresource;

import java.util.List;

import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.MatchQueryBuilder.Type;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.china08.yxyapi.api.manage.tec.teaching.lecture.res.LectureUploadResController.ResourceReqModel;
import com.china08.yxyapi.api.manage.tec.teaching.lecture.res.LectureUploadResController.UploadResp;
import com.china08.yxyapi.entity.es.ElasticYxyResResource;

public interface YxyResourceLectureService {

    /** 资源查询分页Page */
    Page<ElasticYxyResResource> getPage(BoolQueryBuilder boolQueryBuilder, Pageable pageable);

    BoolQueryBuilder lectureResourceAreaBool(BoolQueryBuilder boolQueryBuilder, String areaId, String type,
            String format);

    BoolQueryBuilder lectureResourceYunBool(BoolQueryBuilder boolQueryBuilder, String format, String type);

    BoolQueryBuilder lectureResourceSchoolBool(BoolQueryBuilder boolQueryBuilder, String SchoolId, String format,
            String type);

    BoolQueryBuilder get(BoolQueryBuilder boolQueryBuilder, String bookcontent, String bookId, String phase,
            String subject, String version, String semester);

    BoolQueryBuilder lectureResourceUserBool(BoolQueryBuilder boolQueryBuilder, String userId, String schoolId,
            String format, String type);

    List<UploadResp> lectureResourceAdd(List<ResourceReqModel> resources, int size, String bookcontentsId,
            Integer viewScope, String intro, String userId, String schoolId, String provinceCode, String cityCode,
            String districtCode, String schoolNick, String userNick) throws Exception;

    Page<ElasticYxyResResource> lectureResourceArea(boolean jingRes, String vipCondition, String areaId,
            Integer resType, String phase, String subject, String version, String bookcontent, String semester,
            String bookId, String type, String format, String keyword, Type phrase, Pageable pageable);

    BoolQueryBuilder keyword(String keyword, Integer type, BoolQueryBuilder builder);

    Page<ElasticYxyResResource> getPageEs(BoolQueryBuilder maxBoolQueryBuilder, String keyword, Pageable pageable);

    Page<ElasticYxyResResource> lectureResourceSchool(boolean jingRes, String vipCondition, String schoolId,
            Integer resType, String phase, String subject, String version, String bookcontent, String semester,
            String bookId, String type, String format, String keyword, Type phrase, Pageable pageable);

    Page<ElasticYxyResResource> lectureResourceYun(boolean jingRes, String vipCondition, Integer resType, String phase,
            String subject, String version, String bookcontent, String semester, String bookId, String type,
            String format, String keyword, Type phrase, Pageable pageable);

    Page<ElasticYxyResResource> lectureResourceMy(boolean jingRes, String vipCondition, String userId, String schoolId,
            Integer resType, String phase, String subject, String version, String bookcontent, String semester,
            String bookId, String type, String format, String keyword, Type searchType, Pageable pageable);
}
